fixed requiresAuth bug