Refactored login logic
Merge branch 'master' of github.com:puffball/puffball