redirect

how can I set up a redirect to the login page when the customer tries to access an application but it hasn’t logged in yet?

thanks

See the manual: [LEFT]sc_redir (Application, Parameter01; Parameter02; Target, Error, height_modal, width_modal)[/LEFT]
This macro its used to redirects to other application or URL.

yes, I know about that function. however I don’t need a fixed redirect. I want to redirect only when not logged in.
what function or variable checks if the user is logged in or not?