Lots of refactoring
Merge pull request #4 from sluu99/user_auth

Lots of refactoring