simple implementation of json web tokens for api access