refactored authentication
Merge pull request #2 from ryanlangton/authentication_refactor

refactored authentication