fix parse order of connect frame's payload
fix bugs and implement several