How to show custom session expired dialog in Jmix (similar to CUBA)?

Hello Jmix team!
In CUBA applications, when the user’s session expires (for example, when the same user logs in from another browser), a notification dialog is shown automatically:

  • It displays a message like “Session has expired. Please log in again.”
  • It has an OK button that redirects the user back to the login page.

In Jmix (Vaadin Flow), by default, when the session expires, I see a technical message like:
image

I want to implement the same behavior as in CUBA:

  • Show a user-friendly dialog
  • Provide an OK button that redirects the user to /login.

I use Jmix v.2.6.1