Fixed async bug with login