Bug 10240 follow-up: don't delete transactions if auth fails

When uploading transactions, we were not checking that authentication
had succeeded before deleting the transactions from the local database.
That was bad. With this patch, we check. That is good.