without knowing anything about your situation, specifically your database schema, how you're interacting with your database, or even how your user is logging out or if you're using objects or procedural code, it's impossible to even suggest a good solution that will work. Show some code and explain your situation a little bit and we will be more able to help you