Adjusted login error handling