Added a final logout prior to application exit to prevent users from being cached