updated the login query for dispatcher