Fixed async issues with login