added password and email validation