Catch failed logins and throw an exception so we don't continue.
Merge pull request #75 from AlexStansfield/master

Catch failed logins and throw an exception so we don't continue.