                 url: "https://api-content.dropbox.com/1/files_put/sandbox/" + e.id + ".seed"
                 data: data
                 beforeSend: (xhr) ->
-                  xhr.setRequestHeader 'Authorization', 'Bearer ' + localStorage.Token
+                  xhr.setRequestHeader 'Authorization', 'Bearer ' + Sync.oauth.access_token
               )
             )
 

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

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

