call logout on exit from client