fix login event to run async