Jhbate/highwater

addition of highwater and updates to gatekeeper client for access and invites work. @cheddar could you check this out please.
if encodePermissions fails, this is going to have nil passed in, which might cause unexpected things to happen?