Did you check the Deep link module: https://docs.mendix.com/appstore/modules/deep-link. If I understand your requirements correctly, this could cover your needs.
The deeplink module alone is not enough to make this work.
You can make your own custom Java action that would put the forwarded User in Session.
You can do something like:
ISession newSession = Core.initializeSession(Core.getUser(systemContext, user.getName()), "");
and then just make a cookie with that session.