updated template and js code to reflect change 'username' to 'email'
added basic email validation and commenting