CS-4491: Fix smarty login_form block

Fix login/logout action.
Fix unit tests.
Merge branch 'fix-template-login' of https://github.com/petrjasek/Newscoop into v4.1