Fix a call to os.Hostname.

(Use hostGetter, for testing.)
Add an auth test.