Ubuntu 16.04 ++ forces logout when trying to shutdown or reboot from menu – guilty party: PLANK dock
Source: http://www.linuxslaves.com/2016/06/fix-cant-shutdown-from-ubuntus-toppanel-after-install-plank.html
Shutdown or Restart – forces Logout, then from main Lightdm screen shutdown/restart works.
Problem is with PLANK dock.
Open: Startup Applications
Select: plank; for the ‘command’ enter:
sh -c "sleep 10 && plank"
All will be OK on next login/restart.