Add tests, initial movement towards pre-auth