Cancel payments for closed orders on log in.

Plus some other cleanups.

BB-1501 #resolve