Using a custom login page with restricted pages

I am using a custom login to manage user signin. I would like to restrict access to certain pages to allow only logged in users to view them. However, when I tested out navigating to the restricted page the default login lightbox opened.

Is there a way to enforce the custom login? Or would I have to call the custom login lightbox directly from the page.

I have figured out the thing that was missing. I had to switch the default login flow from the sign up page to the login page: