Made query like life again

Also did a bunch of stuff, like escape username/pass and proper
threading on querying the repository