Minor fixes for ON authN
Implemented OsTpl in the ON backend
Refactored authN for the ON backend

* Useful stuff pushed to a helper
* Made #run_before more generic