Merge pull request #4 from backbone87/master

only perform authenticated requests, if username is set
fix infinite loop when no authentication should be performed even after
401