Adding support for domains.

 - Login is now public to allow reauthenticating to get around the idle
timeout introduced in 5.x
 - Taking out trusting all SSL certificates, its up to the caller to do
this.