only logout n exit on close