You've oversimplified the situation regarding Jerusalem, and indeed the whole West Bank Babylon. The Six Day war never really had a formal peace agreement, rather a ceasefire then occupation of the West Bank, Golan Heights, Gaza and the Sinai. The Sinai was later returned to Egypt and both Egypt and Jordan have renounced their claims to Gaza and the West Bank respectively. Since then, the Palestinian territories have been considered territories occupied by Israel. The issue arises in that no international body and no nation (not even Israel) recognises the two territories as Israeli territory due to the claims of the Palestinian Authority and other such (legal) organisations (Hamas is generally considered a terrorist group, and quite rightly as well!). The territory of East Jerusalem was by a 1980 Israeli law annexed (or effectively annexed) and declared the "undivided capital of Israel". However this annexation as with similar annexations are generally illegal under international law, and it was declared such in the United Nations Security Council and the international courts. It should be noted that the "effectiveness" of the control of a certain region is no measure of international recognition, and if that was so, for example, Manchukuo should have been recognised, when evidently it was an illegal incursion into the territory of another country.
I personally have little problem with Israel having its capital and its institutions located West Jerusalem, the region which it under international law owns. From my understanding its institutions are located in this part of the city anyway. But the barrier to accepting the relocation of Israel's capital though isn't that the United Nations doesn't want Israel to have its institutions in West Jerusalem, but that the law that moved the capital was itself invalid due to the issue of East Jerusalem. If Israel repudiated this law and passed a second that would not concern East Jerusalem then by all means it would likely be accepted by the United Nations and other nations. Until then though the U.N. and other nation cannot and should not recognise the Jerusalem Law and hence Tel Aviv remains the legal capital.
As for what I think should happen in Jerusalem, in the best case East Jerusalem could become the capital of a Palestinian State and West Jerusalem that of Israel. Oh and on the issue of a name, it's likely that a Palestinian State would rename East Jerusalem "Al Qud", and probably in response West Jerusalem would just become "Jerusalem".