simplify login_d.