Quantizing the rotating string with massive endpoints