local login handler
Merge pull request #17 from craigspaeth/master

Handle login errors and JSON requests to login path