Handling invalid CONNECT messages