The problem for me was the fact that the "DeepLink.LoginLocation" constant in the modeler shows in the documentation that it can be left empty, and then the default login page would be used. Where this is true for the localhost (development), it isn't true for the production environment, where you have to set the value to ''. Thanks to Bart Luijten (Mendix) today I finally found out. This might have been obvious for some, but not for me.
The only thing that could be different between a local and production deployment, is using a seperate webserver. So the only you have to do, is proxying /link in your webserver.