Fixing bug when trying to register with an existing email and it hangs