Rework error handling for login/signup.