return type for add_account and more logging for debugging