Guantanamo bay is leased by the US in a unilateral agreement with the Cuban government who no longer considers the US Navy presence welcome or of mutual benefit. America pays $4000/year by a check that never gets cashed, so in effect they are squatting, although by offering the check they do at least accept that they are a foreign occupation.
The terms of the lease state that the bay may be used as a coaling station, but makes no mention of the area being used as a concentration camp for detainees in violation of the Geneva code.
Obama should make plans to withdraw the US presence from Cuba as soon as possible, as America is no longer bound to the lease which allows for termination if both parties agree. This would put an end to entire problem.