Encrypt passwords in UserDatastore

This PR encrypts passwords automatically inside UserDatastore. I believe it makes sense to do this, and it seems to be the behaviour most people would expect.

Originally proposed by @alexturek in issue #267. Should fix issue #264.