Implement JWT

I've a few notes over this
- There is no clear difference between what should be public and what are the helpers that are supposed to be private
- There is zero documentation!
- encode should have an overload that doesn't take an algorithm and chooses a sensible default, I'm assuming consumers of the function will not be able to figure out which algorithm to use