Move admin check into a hook