                     path: file
                   }
                   beforeSend: (xhr) ->
-                    xhr.setRequestHeader "Authorization", "Bearer " + localStorage.Token
+                    xhr.setRequestHeader "Authorization", "Bearer " + Sync.oauth.access_token
                 ).done (data) ->
                   deferred.resolve()
 

            url: "https://api-content.dropbox.com/1/files_put/sandbox/meta.seed"
            data: JSON.stringify(result[0])
            beforeSend: (xhr) ->
              xhr.setRequestHeader 'Authorization', 'Bearer ' + localStorage.Token
          ).done (data) ->
            console.log("all done! Delete the queue")
            Sync.queue = {"Note": {}, "Notebook": {}}

                  dataType: "text"
                  url: "https://api-content.dropbox.com/1/files/sandbox/" + item[1] + ".seed"
                  beforeSend: (xhr) ->
                    xhr.setRequestHeader "Authorization", "Bearer " + Sync.oauth.access_token
                ).done (data) ->
                  # We now have to store the new data in the database.
                  trans = Sync.db.transaction(["notes"], "readwrite")
