debugged logout sequence