Three rules on positioning: Safety, Stability, View and always remember you need to be able to stop in the distance you can see clear on your side of the road. Also remember that you need to sort out your speed *before* you select your gear for the corner.
First thing to do is to look at the limit point (the furthest point ahead you can see the road clearly) and adjust your speed so that it's staying in a constant position. If it's coming towards you, you're going too fast, so slow down.
This will also give you time to observe the road surface ahead of you and be able to change your speed and position again if you're heading towards a dodgy surface.
Once you have your speed sorted, then change to a gear which will give you the best drive through the corner ie where keeping a balanced throttle will have the engine just "pulling" as you corner, whilst opening it will give you acceleration and closing it will brake you.
If you *have* to brake in a corner *only* use engine braking or rear brake, this will tend to pull you into the corner whilst the front brake will put the bike upright and send you wide.
If you need to steer, grip the tank with your thighs, push down with your outside leg (anchor it on the footpeg and press your outside thigh into the tank) and then countersteer by pushing the inside handlebar away from you which will cause the bike to lean further into the turn. Bikes are actually incredibly good at cornering *if* you let them. Panicking, straightening the arms and grabbing the front brake will all make it very difficult for the bike to do what it should.
And, most importantly, remember what happened to ensure that it is less likely to happen again