It wasn't clear when to call `SetControllerSecret` now it can't be done wrong. Also the mutex has to be locked less often.
157c6af18e