Fixes a transactional bug when creating a notification for group invitation. Also fixes to redirect to /groups when receiving a request to join a group.