I have this View page in Codeigniter

```
<?php 
$is_logged_in = $this->session->userdata('is_logged_in');

        if (!isset($is_logged_in) || $is_logged_in != true) 
        {
            return false;
        }
 ?>
<html>
<head>
    <title></title>
    <link rel="stylesheet" href="<?php echo base_url();?>css/style.css" type="text/css" media="screen" />
</head>
<body>
    <p><?php echo form_open('it/create'); ?></p>
    <p><?php echo form_input('department', 'department'); ?></p>
<p><?php echo form_textarea('problem', 'Issue'); ?></p>
    <p><?php echo form_submit('submit', 'Submit'); ?></p>
    <p><?php echo form_close(); ?></p>
</body>
</html>

```

and this is the controlle

```
    class Create extends CI_Controller {

        public function __construct()
        {
            parent::__construct();
            $this->is_logged_in();
        }

        public function create_issue()
        {
            $this->load->view('v_it');
        }

        public function is_logged_in()
        {
            $is_logged_in = $this->session->userdata('is_logged_in');

            if (!isset($is_logged_in) || $is_logged_in != true) 
            {
                echo "you don't have permission";
            }
        }
    }

```

but when I'm loging in to the view directly from url it opens without problem, What's wrong whith this, I even added the SESSION in the view page directly like I added but it opens.

UPDATE: And that's where I add the SESSION in another controller:

```
$data = array(
                'username' => $this->input->post('username'),
                'is_loged_in' => 'true' );

            $this->session->set_userdata($data);
            redirect('create/create_issue');

```