Refactor exception handling.
Check for lecturer.
Fixed cancan authorization checks. unauthorized! has been removed from cancan.