title: Node Express route to new window location upon ajax success
body: <p>Upon hitting my web page through the initial url <code>/</code> I have an input where a password is needed to view the next page. I am not quite sure how to redirect the user to the next page upon a successful password match.</p>
  
  <p>Client call:</p>
  
  <pre><code>var urlToCall = baseUrl + '/info?pass=' + password;
  $.ajax({
    'url' : urlToCall,
    'type' : 'GET'
  })
  .done(function(data){
    console.log(data)
  })
  .fail(function(error){
    console.log(error);
  });
  </code></pre>
  
  <p>Node/express:</p>
  
  <pre><code>var info = require('./routes/info');
  app.use('/info', info);
  
  router.get('/', function(req, res, next) {
       //... logic to check password and such
  
      res.render('info', { title: 'Book Info' });
  })
  </code></pre>
  
  <p>The thing is I am returned a string of html from the file <code>info.ejs</code> on a success. Now if I go to the url in the browser instead of through the password <code>https://myUrl.com/info?pass=mypassword</code> it successfully routes me to it. So through the ajax check, how can I do the same? </p>
  
  <p><code>res.render</code> is only giving me the html back, but I need to rout the user to this page.</p>
  
  <p>Thanks for any help</p>