Under the assumption you're using the NodeJS server target, you should attach a Server Action to the page, and in that Server Action you use the Security Restrict step. This will cause the page to be redirected to your login page if the user is not logged-in. An advanced use is using the Globals steps instead of attaching a Server Action to each page.
You can also explore server-side rendering: