added callback when validating tokens to update a ui