moved auth check back