added onhandshake callback handler so we can perform authorization before the connection HTTP connection is upgraded to a websocket.