Add account to Join event

Also reorganizes some logic. The account will usually be NULL unless
extended-join capability enabled.

Closes #934