Actually when you log out, I understand that OSX receives a request to log-out. I t processes this if it sees it can do it. Sometimes, there are processes that will prevent a logout.
If there is anything running, or hung in the background, try quitting that first.