Created the course controller and method to check if the logged user is admin