fix require_token so that it no longer consumes its input