Guard against empty user names.

This prevents a 500, which is always worrying on a log in page.