Trim inputted nickname to prevent undefined names

This closes #48.