logout doesn't redirect if on main page