I ran across the same problem. It started happening after I began to test my restore code for an in-app purchase. I tried everything, including resetting my iPod, and it didn't matter. The login was happening when adding the transaction observer. I resolved the issue by added the following code before adding the transaction observer.
for transaction:SKPaymentTransaction in SKPaymentQueue.defaultQueue().transactions {
SKPaymentQueue.defaultQueue().finishTransaction(transaction)
}
This was only temporary code, used to clear out the queue, though I don't see a problem with leaving it in. One thing I've been puzzling through is how to handle it when the app crashes while doing an IAP. It seems to leave the IAP in the queue. Instead of finishing a transaction that's the result of a crash, I would rather remove it. I haven't figured out how to do that, yet.
I then added a finishTransaction
to the restore, so that I wouldn't have this issue any longer.