getToken made into async call