Linting cleanup, DRY refactor of authentication code, expose user object as JSON via GET