changed login to be async