Improve error messages in login