title: Creating database entries in Exist-DB with Ajax calls
body: <p>While developing a self-contained exist-db app I ran into some issues with passing on the user's identity during an ajax call.</p>
  
  <p>I have created a standard page that allows the user to login in with his or her standard exist-db account. (It's more or less based on this <a href="https://github.com/eXist-db/existdb-login" rel="nofollow noreferrer">https://github.com/eXist-db/existdb-login</a> ). </p>
  
  <p>At some point, the users need to create their own entries and upload files, and this is done with an ajax script (I'm using Kartik's bootstrap uploader, but it's basically a standard ajax upload function):</p>
  
  <pre><code>$('#input-24').fileinput({
  
          uploadUrl: "../modules/uploader.xql",
          uploadAsync: true,
  
          fileActionSettings : {
              uploadExtraData() {
  
                  return {
                      'FileName': $(this).data('title'),
  
                  }
              }
          },
      });  
  </code></pre>
  
  <p>Now, of course, this will fail, since it will appear like a GUEST user is trying to create entries, which is an action that is allowed only for registered users. </p>
  
  <p>Does exist-db allow a way to send in my login credentials at this point without having to resort to the standard HTTP login (which is problematic, since it means creating a cookie to memorize the password, which more or less renders the whole login suing exist's mechanisms useless), or is there any way to use the controller instead of an external script?</p>
  
  <p>Thanks in advance!</p>