Add function to sanitize username to avoid potential inject attacks.
Add reaction to enter key presses for the login entry form.
Add check to prevent weapons firing for users that have not yet
logged in.

Fixes #2481.  Fixes #2484.