Improve invite code authentication