login: refine login form code;