Fixing permissions on resources (return 401 if no apikey)