refactored and added token refresh class/endpoint