Redirecting from login app to another app

Hi everybody.

I use to send emails that allows a user to access an arbitrary app without having to navigate from the menu application.

For example a link like this: …/displaydoc/?ndoc=xxx

If the user is already logged in everything works fine, and the displaydoc app starts correctly.

But if a user hasn’t logged, he’s redirected to the login page and the to the main page of the system (not the page he tryed to open …)

Is there any way to redirect the user to the displaydoc app instead of the main menu application?

TIA