add authentication infrastructure:  secrets for devices, hashing and access tokens.   add test fixture infrastructure to enable us to test this, and lots of cleanup and fixes.