Moved auth to front, cleaned up, comments.