Add functionality to join group or discard invitations.

- Fix #8.