For this you can use a state param to keep track of what the user was doing when they left the app to go sign in.
For this, I would recommend passing a param as you described, then write a conditional statement in the Classic Universal Login customization page that changes the input options depending on the param you passed.