title: While running cypress test, when I visit new url after login, page stays on current url only
body: <p>Here is my code to perform login and then visit users.</p>
  <pre><code>        cy.visit('http://localhost:3000/')
          cy.get(&quot;#username&quot;).clear().invoke('val', &quot;admin&quot;)
          cy.get(&quot;#password&quot;).clear().invoke('val',&quot;password&quot;)
          cy.get(&quot;button[type='submit']&quot;).click()
          //cy.wait(500)-&gt; If I un-comment this line, it works fine 
          cy.visit('/users/new')
  </code></pre>
  <p>Now it happens so fast that if I don't put wait of 500ms in between, it gives me an error of &quot;failed xhr request&quot;. See the screenshot below.</p>
  <p><a href="https://i.stack.imgur.com/adqqa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/adqqa.png" alt="enter image description here" /></a></p>
  <p>Can anyone suggest me how to wait dynamically until the request is resolved?</p>