[Tokenlib] switch to base64 url safe encoding