Add option to connect to login server only once.

Also allow global specification of main host/port.