I think we need to consider moving to having a `Sync` object that you create via a constructor.  Then you can do stuff like:

```javascript
// Create a new sync object, register with various tables (e.g., syncTable), generate any IDs you need, etc.
var sync = new Sync(username);
...
// get the fs for this sync session
var fs = sync.fs;
...
// get the syncID/connectionID for this sync session (generated in constructor)
var syncID = sync.id;
...
// get the user for this sync session
var user = sync.user;
...
// Finish the sync session, remove from global tables, remove event listeners, etc.
sync.close();
```

There's more we can do, but the idea would be that `lib/sync.js` could manage much of this crap behind the scenes.