1, add setupLoginTty after set password; 2, remove some unused constants