New methods and constructor parameters validation.

New methods for settting and updating users' metadata, and to create
new users.
New tests are unfortunately not in very good shape.