Auth token creation refactored