Handle login errors and JSON requests to login path

Putting more logic into Artsy Passport.