updated sign in logic