Pass message for logout after the switch so it can be displayed