rename proto state and reorganize nonce checking
make client secret optional (support self-issued OP)
correct code comments