         if app.crypto? and app.crypto.masterKey? and app.crypto.slaveKey?
             slaveKey = crypto.decrypt app.crypto.masterKey, app.crypto.slaveKey
             @doc.password = crypto.decrypt slaveKey, encryptedPwd
+            @doc.toString = toString
             send @doc
         else
             console.log "[updateKeys] err: masterKey and slaveKey don't\

            callback false, new Error("master key and slave key don't exist")
    else
        callback false


# POST /accounts/password/

action 'createAccount', ->
    @body = body
    body.docType = "Account"
    body.toString = toString
    encryptPassword (pwdExist, err) ->
        if err
            console.log "[createAccount] err: #{err}"
