Improve async notifications while signing in

- Add infrastructure for async communication between the
CallbackServicehandler and the UI.
- Add more documenttion to "options" in javaScript.