removed when refresh and window close auto logout