In the appstore there's a module called 'Forgot Password’ which also has a registration page/flow. But the difficulty here is that you want to act based upon registration but before login, which is something you don't know. The registration and login pages are for anonymous users. Since the user isn't logged in, you don't know which one it is and therefor not if he/she is signed up.
If it's a mobile app, you could check if you can store the info somewhere outside of the Mendix-application I suppose?
I suppose on sign up you could send an email to a deeplinked page (which would be the login page) and tell the user to access the app through that new deeplink.
Usually though the login page would cover both the functions you want traditionally. Do you have an account please login and a button saying i don’t have an account register…
As Sytze points out. Everyone is anonymous when they first come into your app. You can only really route them by user role once they have logged in.