this should
only happen when you use back button
because you get an old copy from your own computer internet history files
stored by your browser.
In such old pages, logout links can be shown, even if you are already logged out
When going Back, using back button, or using link javascript (history)
to such a previous page, you can Do a Refresh
to get a new version, with current data in SESSION(acces)
and you will see, if your script is correct,
that Link will become 'Login', in the Fresh copy of this page
There can of course be other reasons (from incorrect php checking SESSION variable in php),
but this is the most common case: old pages cached by your browser in 'history folder'
/halojoy