Fixes #23.
Merge pull request #24 from brennonbrimhall/topic/fixInfiniteRedirects

Fixes #23.