Client library: fix sequence number reporting with authentication error message.