added aysnc authentication with callback