Fix a null-pointer crash bug.

Also change login-UI's input-box to empty when first time run.