master: changed the error handling for login