Replaces auth check in adminlayout