Fix bug during login with email session creation