Fix shutdown race
This merge request makes a few fixes to ensure the session doesn't exit until all systemd user services are exited.
This merge request makes a few fixes to ensure the session doesn't exit until all systemd user services are exited.