Add basic auth to the app.
Minor refactoring.
Merge pull request #35 from trainingwheels/TW-76-login

TW-76 Add basic auth to the app.