Type is forced to text_type then checked with str

This change allows the type to be correctly checked on Python 2.7
Checkin initial spike test for auth via web-service

This is a hacky attempt to get authentication via a web-service
working. This kind of functionality really needs to be a built-in
rather than something bolted on at the application level.