cleaned up some query formatting in users lib