Server: Fix registration.
Fix TemplateServlet exceptions while sending registration mail.
Misc errors in registration, DB user login.
Server: not storing permissions of new registered user.
Refresh tab after submitting.