Extended users API to support updating and deleting users.

Also added tests.