Well....the first thing is discipline, there's no one to motivate you to do the courses, so you need to be on top of it yourself.
That said, I find any courses that I take that have online lectures, are much more difficult to stay with. I think this is because you can always put off the lectures and such until later.
It's much easier to stay on top of a course you have to attend, because you don't get to put it off until later if you need to go to the lectures, because the time schedule is set for you. So one option would be to consider it like a live course, and set aside a certain time where you absolutely MUST do coursework. This is not just penciling it in and saying "well, I'll plan to do it during this time". It has to be a must, if someone says "hey let's go out at x time", if it's during your scheduled course time, then you need to say, "sorry I have class". It may be online, but you really do have class.
If this fails, and you still aren't doing anything, then you need to rethink priorities and decide what's important to you. If school is truly important enough to you, you will find tools or tricks to help motivate yourself. If not, then there's not much any tip/trick will do for you.