Email validation logic added