added email verification to register method.