Move call to get token to main class.