Invite system

Fix #513