Revert "replace hashlib.sha1 with default_token_generator in InvitationManager"

This reverts commit b428dca56030a2ddc2b56afcf22d209915088d4d.
tweak in invitation code generator