login code modified