React router loses state when changing URL

Hi all,
I’m creating a small app using React, Redux and React-Router I’ve two routes: Login and Index,
Index is only accessible if logged is true in the redux state. When I’m logged and go to index (manually by changing the url) the state in redux is lost and obviously logged is false (by default)
How can I keep the redux state when changing url, do I need a special package or I’m missing something ?

Put the provider for redux higher in the tree than the provider for the router. So

<Provider>
  <Router>

Not

<Router>
  <Provider>

And make sure you’ve got the router and routes set up properly so that the browser isn’t actually reloading anything, as naturally that will break your app regardless of what you do.

This is what i’ve done, I don’t think its related to the provider because when I make a redirect to index after successfully logged the state keeped