Rename type => typ in the header

Check in the following draft
https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-27#section-5
.1
Fix the signature part