Fixes to login module
Merge pull request #858 from mposolda/master

Fixes to login module