GBE-501: make all tests that login clear the security context afterwards...

.... Make conde duplication generic.

NEEDS VOTE.