move security backends to new modules, create some convenience functions