Add option to sort by notebook, fix sync bug

Adds an option to sort in the indicator by notebook,
and fixes a bug where sync would never run after
de-authorizing (unless the daemon was restarted)