title: react router redirects to home page on refresh
body: <p>I have the following code:</p>
  <pre><code>let routes = 
          &lt;Switch&gt;
              &lt;Route path=&quot;/&quot; exact component={Authentication} /&gt;
              &lt;Route path=&quot;/test&quot; exact render = {props=&gt; &lt;Authentication/&gt;} /&gt;
              &lt;Redirect to=&quot;/&quot; /&gt;
          &lt;/Switch&gt;
          if(this.props.isLoggedIn){
              routes = 
                  &lt;&gt;
                      &lt;div className='mobile-header' onClick={this.handleNavBarShow}&gt;
                          &lt;p className=&quot;mobile-menu-icon&quot;&gt;
                              &lt;i className=&quot;fa fa-bars&quot;&gt;&lt;/i&gt;
                          &lt;/p&gt;
                      &lt;p&gt;Title&lt;/p&gt;
                      &lt;/div&gt;
                      &lt;NavBar toShow = {this.state.showMobileNavBar} 
                              onClicked = {(e)=&gt;this.handleShowAndHide(e,true)}
                      /&gt;
                      &lt;Switch&gt;
                          &lt;Route path =&quot;/&quot; exact render = {props=&gt; &lt;Authentication/&gt;}/&gt;   
                          &lt;Route path =&quot;/a&quot; exact render = {props=&gt; &lt;Test1/&gt;}/&gt;
                          &lt;Route path = &quot;/b&quot; exact render ={props =&gt;&lt;Test2/&gt;}/&gt;
                          &lt;Route path = &quot;/c&quot; exact render ={props =&gt;&lt;Test3/&gt;}/&gt;
  
                          &lt;Redirect to=&quot;/&quot; /&gt;
                      &lt;/Switch&gt;
                  &lt;/&gt;
          }
          return (
          &lt;Router&gt;
              &lt;div className = &quot;layout&quot; onClick={(event)=&gt;this.handleShowAndHide(event,false)}&gt;
                  {routes} 
                  {showSideBar}         
              &lt;/div&gt;
          &lt;/Router&gt;
          )
  </code></pre>
  <p>problem is when this.props.isLoggedIn === true, whenever i try to reload a route &quot;/a&quot; &quot;/b&quot; &quot;/c&quot;, or type it in the adress bar directly  it redirects to the &quot;/&quot; page. In the Test1 /Test2 /Test 3 components there are links to one another and it works fine.
  also it works fine with reloading and direct typing when this.props.isLoggedIn !== true.
  what could be the problem?</p>