Help me here Niels to understand what you see as a "loggedin" path ?
Are you changing where the server points to when the user logs in ?
To help me understand what you are doing, either post a small app showing the problem
OR try this below.
I have a quiz app in C:\MyApp I do this for students doing a quiz, they upload redactor images to C:\MyApp\Web\Uploads\Image101.PNG
I create a directory as C:\MyApp\Web\Students\Niels
then rename the image to be saved as
C:\MyApp\Web\Students\Niels\Image101.PNG
This way it saves it in your folder and I save the image filename in the TPS file as Students\Niels\Image101.PNG as its all "Web" relative filenames
Is this what you are trying to do ?