title: Grails: Page won't redirect after completed Ajax call
body: <p>This is my ajax call: <code>&lt;body onload =  "${remoteFunction(controller:'accountManagement', action:'createAccount', 
          params:[facebookUID: params.facebookUID, gender: params.gender, firstName: params.firstName, lastName: params.lastName])}"&gt;</code></p>
  
  <p>In my controller I have a redirect instruction at the end:    </p>
  
  <pre><code>def createAccount = {
  
      if(user.save(flush:true) == null){
          ... 
      }
      else{
          ....
  
          for(int i = 0; i &lt; categories.length; i++){
              ...
          }
  
          println "save to database: successful"
  
      }
  
      // Redirect to index action of person controller.
      redirect(controller:'user', action: 'authenticate');
  
  
  }
  `
  </code></pre>
  
  <p>It does not redirect. Instead, it stays on the same loading page that it started on.</p>