Fixed small bug with chat input background

.trim() was messing up the width making it shorter than it should be to
be displayed correctly when there are spaces at the end of the message.
Also start of client commands (hopefully)