refactored deletion of old keys and made an invitation page in admin
fixed invitaion templates