Fixed #258 refactored invites. Fixed #264 extend lifetime of invite instead of sending a new id.