Fixe user management problems.

Add user insert tests.