Add max field length to username entry field.

Fixes #2285.