"(a) IN GENERAL- That the President is authorized to use all necessary and appropriate force against those nations, organizations, or persons he determines planned, authorized, committed, or aided the terrorist attacks that occurred on September 11, 2001, or harbored such organizations or persons, in order to prevent any future acts of international terrorism against the United States by such nations, organizations or persons."
The AUMF refers to prevention of "future acts of international terrorism" but specifically authorizes force only against those who were involved with the 9/11 attacks.
The problematic word is "organizations". The most important lesson we should learn from the 2000s is "never allow the word 'organizations' (or any of its synonyms) to appear in an AUMF again". You can invade a nation, you can kill a person, but there's simply no clear definition of what it means to eradicate an organization.
It upsets me a little to see discussions about things like GTMO distracting themselves from the core issue. The problem isn't detention at GTMO, or drone strikes, or the citizenship status of targets. To engage yourself fully with any of those problems is to nibble around the edges of the real issue.
The problem is that in 2001, Congress issued a declaration of war (that's what the AUMF was) against an ideology. At the time, that might have seemed sensible; a way to take the threat of armed terrorism more seriously than we had. But the problem with it is obvious and it's something Obama is facing down now: you can't eradicate an ideology, which leaves us in a permanent state of war.
If we'd declared war against Afghanistan, the status of prisoners at GTMO would be clearer; we'd at some point declare the conflict over (we'd have to, because contra the Daily Kos left, the USG does not actually want to station hundreds of thousands of soldiers in Afghanistan) and the prisoners would be released.