How to treat expired session within bootstrap modal 4.x?

I have a system where the user chooses a date and time for scheduling, I increased the session time because the user needs to fill out a form with various information, it is working beauty.

It happens that after the session has expired the browser keeps the page in view, when the user clicks the bootstrap modal window appears with the index page for the user to log in again, this "re-login" behavior is already expected.

O problem is that the login screen appears inside the bootstrap modal, I would like it to appear in the entire window otherwise it confuses the user, because when he logs back in he goes to the home page.

Is there a proper way to deal with this or will I have to check which window is being opened in the modal?

Author: Marcelo, 2018-09-24