make frame encoding more robust
make login msg show up