Metabolic regulation through the endosomal system