Implemented the RFC2812 method of logging in (the RFC1459 method is now loginLegacy)