Add tests for control handler

it is still arguably unsafe, but it might do
Clean up the tests for daemon and daemons handlers

Deauthorise all authorised users and daemons.
The fact that all tests live in one space kills me.