Fix issue with email auth.