while I'm at it.
indexes. MongoDB unique indexes are curious in that they do not allow duplicate values of None / not missing. hence, a unique property is not allowed to be missing on more than a single document in a collection. with the unique index on access_tokens.token, we are not allowed have multiple documents without an access token. hence, change the semantics of add_user so that it also issues an access token note that the access token is not activated. add_user() will also now return the issued token. this is better than doing the unique constraint ourselves, because we can never do it without race conditions.
…o enforce this.
…rname or email and password.
mongodb. fix a couple of bugs found while doing this.
start on unit tests for mongodb backend methods.