Most of these things use SSL (secure socket layer) for the communication or at least for the authentication. This can be a hassle to setup and get working. But once you get it going, it works pretty much transparently to you. I looked at one of my LWP gizmos:
use LWP::UserAgent;
use Crypt::SSLeay;
use HTTP::Cookies;