User settings

This is a pull request for issues #455 and #456.

Here is a race condition. It is better to make a query which updated username if username is not set. And then you see how many documents were updated.

Where do you verify if caller of this method have permissions to set the username?