TinyMCE and Moodle

Video: 

Today I got a little bit closer to getting Moodle working with TinyMCE. I am currently stumped with regards to the course authentication.
This is the offending part of code I am yet to understand:
file.php (about line 67)

} else if ($course->id != SITEID) {
require_login($course->id);

The dev version can be found in my http://webtolife.org/moodlesandbox

Currently the course number is hard coded into the page so its not really useful yet.