This morning I found my Mac desktop stuck on logout. I did not want to force reboot it so I did some peeking around for how to logout peacefully. Looks like it is very easy to do:
- ssh into the system from another Mac or linux machine
- sudo killall loginwindow