Fix problem in cleaning up logins which was requiring identical object identity rather than login name equivalence.
Rework tests
Implement creation/updating of databases.