Code Refector: Extract Variables in kimchi.login_window.js

1. Refactor code.
2. Put focus on log-in button instead of password box when browser
   automatically fill in log-in form.

Signed-off-by: Hongliang Wang <hlwang@linux.vnet.ibm.com>