UserDocument(String userName, String passwordHash, Date dateCreated = new Date()) {
this.userName = userName
this.passwordHash = MessageDigest.getInstance("MD5").digest(passwordHash.bytes).encodeHex().toString()
this.dateCreated = dateCreated
}
static DBCollection usersCollection() {
def usersCollection = new CardshifterDB()
.getDB()
.getCollection("usersCollection")
usersCollection
}