So i have a home paeg and i have pinia controlling a login and register modal. i want to be able to enter /login in my browser on my site and that should load my home page and use my pinia store to open my login modal. what's the recommended approach for this i tried a global middleware but maybe i implemented it wrong as it tried to load the page and returned an error it doesn't exist but i though middleware should run before the route tries to load the page?