In Drupal 6.3 or less versions, there is bug in the drupal logout functionality. This seems to be cache related.
If I am logged in to two browser tabs on Firefox and tried to logout in one tab and refresh the site in another tab I see the below problem -
Problem: If I tried to login or logout it says access denied but it shows the admin section links at the top. When i click on any of the admin links it says access denied.
So you might overcome this issue, by changing the line
header(“Cache-Control: store, no-cache, must-revalidate”);
header(“Cache-Control: no-store, no-cache, must-revalidate”);
in function drupal_page_header() in ./include/bootstrap.inc
And clear the cache and refresh your page.
You can also find some insights at http://drupal.org/node/197786