Added switch for request with case for nonce.

If $_POST['request'] === 'nonce', respond by setting sessionStorage.nonce
to $session->nonce