Refactored LecturesController with before_filter.