Refactored token resource and added token service