handle authenticate async
try to use async authentication.
Construct the promise properly.