Adding some login error handling.