Thanks a lot for posting this suggestion. That did the trick for me after days of infinite loops.
Steps in case they are useful for others:
For the purpose of using the iTunes Store I had been advised to create a new Apple ID and activate it for free downloads first through the App Store. Method here:
http://support.apple.com/kb/HT2534
Associating this Apple ID with Click&Buy for downloading paid Apps and Music had not worked before.
Today I initially attempted this paste and refresh method with Safari but that resulted in an error message in iTunes which said the set up had failed.
Pasting the redirect url into a nightly built Safari / WebKit afterwards and trying again resulted in the activation of the account. I'm listening to the first successfully purchased album right now!