One more refactor in Resource
One more refactor in auth