Fixed error handling on login page