Added: wait for dom in login event