Modified some login code.