# command
gsettings get org.gnome.desktop.lockdown disable-log-out
# should be return "false"
# if it's "true", then you need to set it to false to be able to log out, as user in terminal:
gsettings set org.gnome.desktop.lockdown disable-log-out false