handle server errors when logging in