Moved auth to own file