Cancel payments for closed orders on log in.

Plus some other cleanups.

BB-1501 #resolve
Merge pull request #748 from benkonrath/bug-fixes-improvements

Cancel payments for closed orders on log in.