Remove session id from redirectURL

Is there a reason for sid and uid in the redirectURL?
For me that looks like a security problem. 
sid and uid are in the referrer if external links are used.