[#2165] Cope with unicode in the NotAuthorized message. Document existing unicode behaviour with tests.
[#2165] PEP8.