Rewrote user login query