refactoring sfdc example to use shared oauth, configuration code -- also a good example of  using events to communicate between components