Fix bug.
Fix bug.

- fix fatal error when an empty sync request is sent to the server.

- logging boilerplate must be initiated before we start validating the request.

Yubico/yubikey-val,Yubico/yubikey-val,Yubico/yubikey-val