fix embeded websocket handler, if error, close channel
fix token empty check