Fix for #377

wrong redirect after login
Fix for #378
Merge pull request #379 from leider/master

two small fixes (very hot)