Refactor ident check into requireAuth