listen browser close auto logout