validate passwords and check for existing email