WIP: Combined Login/Registration: Set up basic enrollment infrastructure.

Should only need to declare var once in a function so would be
var course = data.course,
      course_modes = course.course_modes;