title: Conditionally securing routes (user registration flow)
body: <p>I need to implement registration flow using react-router-4. Flow consist of following steps: </p>
  
  <ol>
  <li>Create account (email/pass)</li>
  <li>Confirm email</li>
  <li>Create profile (profile details like City, Age etc, required fields)</li>
  </ol>
  
  <p>Application requirements: </p>
  
  <ul>
  <li>if user not logged in, he always should be redirected to <code>Login</code> page</li>
  <li>if user logged in, but email not confirmed, he should always be redirect to <code>ConfirmEmail</code> page (regardless of what URL he type in url address bar, even after loading app after few days)</li>
  <li>if user confirmed email, but didn't yet created profile, I want him to always be redirected to <code>CreateProfile</code> page</li>
  </ul>
  
  <p>So if user didn't finished some step I want always redirect him to this step (even after reloading application and regardless of what URL he type in browser).</p>
  
  <p>As an option I want to restrict user from accessing <code>ConfirmEmail</code> page if he already confirmed it (or restrict access to <code>CreateProfile</code> page if he already created profile).</p>
  
  <p>How to <em>elegantly</em>  implement this logic using React router 4? I think it's a core/fundamental feature of application, so I'm looking for good, scalable solution. </p>
  
  <p>Also i'm using Redux, so please note that at some point I already have following variables in Redux state: <code>isLoggedIn</code>,  <code>isEmailConfirmed</code>, <code>isProfileCreated</code>.</p>
  
  <p>Thanks.</p>