Simplify code for first log on.
Merge pull request #112 from jsha/simplify-login

Simplify code for first log on.