getting authentication steps up to speed.

removing unfortunate commit, need to rebase into previous

Squashed, hopefully.