Account for members without local forening
Fetch upper/lower membership type code dynamically
Remove the deprecated hmac function