complete logging in with tests and helpers