Cleaned up User and Identity

Split out a UserPersistence Ecot, to absorb all that nasty SQL code.

Also created a proper interface for the TOS.