better authorization handling
Merge pull request #17 from youknowriad/master

better authorization handling