User validation

Email sending function improved, now with html content.

validateUser function added.