Fix auto logout