added email and name validation for user registration
minor bug fix in register user