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

...page
I think you can just check MySession::get('user_id') so if it is not set then redirect to main/login so you don't have to check the "user" object/array