Just sounds like everything was not properly in position when you tightened it up, and when you started to ride it, things moved into place, hence the slack, or the bolts clamping the stem to the steerer tube were not tight enough (careful you don't over tighten though), just try doing it up again, if you take the front wheel out and support the fork under the crown with one hand as you tighten the bolt down through the steerer with the other, you should be able to feel that everything is sitting together properly, once you have smooth rotation and no play, (and obviously a stem pointing straight ahead) then tighten the two stem bolts that clamp the steerer. Go for a little ride around by your house, try a few wheelies, jump up and down a couple of steps, kerbs etc., anything to give the headset a few gentle shocks to make sure it's all still okay.