Handling authentication in a slightly more sane way.  Fixes #56.