added auth header, refactored, added tests
Merge pull request #1 from harlanbarnes/issue-1

added auth header, refactored, added tests