If you have an anonymous user, and you have the user you want to create a session for (i.e. the system.user object from your database, which is a generalization of your account), you can create a Java action (UpgradeSession) with the system.user object that you want to upgrade the session to.
The Java action should contain the following code.
// BEGIN USER CODE
IContext systemContext = Core.createSystemContext();
UUID currentSessionId = this.getContext().getSession().getId();
IUser iUser = Core.getUser(systemContext, user.getName());
Core.initializeSession(iUser, currentSessionId.toString());
return true;
// END USER CODE
After you have upgraded the session, you can show a page with the URL redirector widget, redirecting the user to your application's root URL.
Note: this only works in Mendix 6, for Mendix 7 you require a request handler.
I think the deeplink module would be a good option. This deeplink should open the page that is not available for an anonymous user. Use the URL redirect to trigger the deeplink. Since the user is anonymous the deeplink will handle the login and continuation to the page.
You probably could also use the permanent link as described here: https://docs.mendix.com/refguide6/page
See the URL part. As far as I know if the current user does not have enough rights it will also do a login. I have not yet played with that concept myself a lot so you should try if this also works.
Regards,
Ronald