allow auto login from actual login page and some related code refactoring
refine auto login on login page
Merge pull request #1 from tleilax/master

allow auto login from actual login page and some related code refactorin...