Add nonce and nonce checking