adding async basic authentication support