When your session is blocked on a "Logout..." message with a blue background, just press CTRL-ALT-END (or CTRL-ALT-FIN if your keyboard is French) then click on Cancel.



You will then be able to see the application that is blocking the closing of your session. Most of the time, it is just an application that asks to save a file before being closed.