Updated the panels to also logout when closed