changed login query to queryrow