Protect your pages - portapipe/Login-GroceryCrud GitHub Wiki

// ! INTO THE FUNCTION YOU NEED TO PROTECT THE ACCESS !
//Check if the user is logged in
if(!$this->login_model->isLogged()){
    //you are not permitted to see this page, so go to the login page
    $this->login_model->logout();
    return; //just in case...
}

Suggestion: if you want to protect ALL the admin panel, put this code into the construct function