added sasl checks for client (similar to server-side)

tests for #22