Well technically this would only happen if the user was trying to hack into someone else's data by changing the url, so I'm not sure how important it is to have a smooth user experience for this case.
You could add logic to redirect to another page (the login page makes sense) when the recordset is empty.