Modified the controller to redirect the login to the courses page