I think that you won't have to pay any of the studentship back for the time you've been registered, but they're usually paid for a few months in advance so you'll have to pay back any amount that covers the time you'll no longer be registered for. So, if you get a payment for 3 months and leave after 1 month, you'll owe two months-worth of the money back.