[Refactor] cleaned up and fixed login code and flow. Now working on Paul's android phone.
Merge pull request #96 from paulyi326/dev

[Refactor] cleaned up and fixed login code and flow. Now working on Paul's android device