Hey Francois,
You could put a DataView with a Nanoflow datasource on the page( which shows after the SignIn button is clicked).
This will led the Nanoflow to be called, just before the page loads(Or you can say as soon as the SignIn button is clicked).
https://docs.mendix.com/refguide/nanoflow-source/
Hope it helps!