More validation on connect packet encoding