added javascript pw validation
added sendMail() function