You should explain more about the authentication and authorization mechanisms you're using. Its also hard to give you any sample code because you haven't said what language you're using.
You might consider hard coding it into the page the link follows and then redirect them (write response headers to redirect them or output a html redirection). Before you write the headers you'll call whatever mechanism you use to authenticate them and then I assume you don't reauthenticate them for every request, so they'll be logged in until they log out or their session expires. They'll never even need to know the credentials for the account they're using.
If they're already logged in you'll need to overwrite the username they're authenticated with, as most systems are set up to let you log in as a single user.
There are a lot of ways to handle this situation, I can probably come up with 10 which are all fine.
I use (, ; : -) as I please- instead of learning the English language specification: I decided to learn Scheme and Java;