Better Exception handling on login.