Added email validation in server and client