Moved email verification to a method so it can be used once login is implemented