more effective code to get AuthToken