
How can I in the code manage user type?
For example "if the user is logged in and is an admin user, do this, if he is a power user, do this".
https://learn.microsoft.com/en-us/power-pages/configure/liquid/liquid-objects#attributes-18
{% if user.roles contains 'Administrators' %}
User is an administrator.
{% endif %}
To make it secure the target page should also be secured with a web page access control role restricted to the respective Web Role https://learn.microsoft.com/en-us/power-pages/security/page-security