Fixed bugs and improved template for email activation
The sendemail function (used before, forgot to push)