update login logic
update login logic