test: add Swift unit test
swift: really send X-Auth-Token with requests

The second argument is a configuration object, not the headers
directly.
auth: add an authService that can track authentication

This will be used later to make a popup dialog when authentication is
needed.
login: show a dialog when authentication is needed

The dialog is shown as a popup window. The state of the applicaiton
doesn't matter -- we simply show the dialog when we notice that we
need authentication. So in typical usage the user will see the dialog
when first accessing the app. If the session cookie or auth token
expires, the dialog will automatically reappear.
auth: add some documentation