Add support for triggering login/logout from the host/guest side

This is rather trivial. I am submitting this PR so that you can catch if I am using some of the "wrong" APIs somewhere.

   * * *

These methods can be used for integrating H login mechanism with
code living on the host page.

 * annotator.login(username, password) now returns a promise.
 * annotator.logout() works, too.

Closes #882