That code is entirely server side, so I can't imagine why it wouldn't be working on a particular device. It really shouldn't be possible, particularly for something that would show if you are not logged in.
Do you have an auto-login feature? Maybe they are logged in and just don't know it?