Customise CoursePress Join Button Links

This ticket is in relation to the button which is on the Course Overview page of the native Coursepress theme.

I am wanting to customise the button's destinations based on the following:
- If not logged in, assume the user is not a member and redirect to our custom sign up page (not a popup).
- If logged in but not yet enrolled, do as Coursepress already does and have the pop up and the rest.
- If already enrolled, take the student to the next lesson which isn't 100%. Currently under these circumstances, the button is taking the student to the most recently completed (100%) lesson.

Additionally, I would like to customise the 'Save Progress and Exit' link at the bottom of each unit in all courses to take the user to the COURSE/units page where it lists all units available in the current course.

How can I go about making these changes?