fix some javascript errors.  add hooks for join/part notifications.

Related server change incoming.