Added email validation for signup form. Improved code