updated query in login