Fixing an import and how we detect 401s

Fixes issue #2