Fix a bug about login msg length.