Fixed bug causing multiple error messages to be displayed on failed login