If you used an old cassette, that's the problem. That cassette is probably worn out.
If you have a friend with a compatible wheel and up-to-date maintenance, swap it out real quick and see if that fixes it.
You can check the der fast by lining up your eye behind the bike, about 5 feet away. Have the chain in a middle cog, and site down the chain. You should see the upper pulley exactly lined up with the cog the chain's on, or maybe a teensy bit to the left of it.
If it's off, the barrel adjuster on the rear der works like a steering wheel: turn it right and the der goes to the right.