Merge pull request #147 from dacrome/OSNG-354-356

[task] refactore mail and template function, update controller tests
[task] refactore registration module and update templates