makes log in asynchronous