Deletion and Editing of your own comment and Added restriction for Home ...

...page
maybe this will do:

    if(!$user_id = MySession::get("user_id")){
        header("location: /main/login");
    }