Raise AuthenticationError if login fails

Extremely brittle check, but at least it works, and it’s about the only
way to check if there was an error. Suppose I could check whether we’re
still on the login page as well, but nah.