added some code to validate new users according to their email address
(needed for password recovery)