Added error message check on login.