Perspective session switch and pass login credentials across gateways

So I have a user management project that needs to be able to switch between gateways. I got it to switch gateways but the credentials don’t transfer over to the new app. Is there a way to try and validate a currently logged in user on a different gateway? Also when you switch on the perspective app it kicks you to your default browser which isn’t a big deal but annoying to deal with.
edit: Reworded to clarify