Implement action to return token as JSON