Updated error handling on login