single result query for login verification