not getting logged out on exit