Add self authenticate
Refactoring - putting a test helper