start on EmailManager, refactor to use shared_ptr for AccountManager