who was the us president when the louisiana territory was purchased?