Hi Johan,
Can you elaborate more on the context of your URL link? Is it on a foreign page? is it in an email? in the same app?
Where in the code did you put your checks?
Perhaps post an example - it's difficult to debug your code without seeing it.
cheers
Bruce