Encrypt teacher password, improve mail

Encrypt teacher password with md5
Change headers and line ending for mails
Indentation fixes