Add in tests and forbid blank username. Disable login and name
change button when appropriate fields are blank.

Fixes #2489.