refactor(account): expose scoped EventEmitter to the state
refactor(account): use state for events
refactor(account): use state for username
refactor(account): split public and private functions
refactor(account): dynamically expose all methods in api