Fix login error handling.