[Bug 881852] Some tests for profile external accounts
[Fix Bug 881852] Improvements/fixes to multi-account code