Fix to authenticate token when it comes from trusted parties