Which file contain the user level rights?

The answer for question 2 is very easy.Assume you’re using >= v2021, then simply put this following code in Page_Rendering server event:

    CurrentPage()->terminate("logout");

This will force all of users to be logged out.