auth functions

Main skelet for authentication in our CMS/RS