reworked the exit script and fixed the pulseaudio logout issues