I will answer this problem by myself as nobody willed to help me :) so that was the causing problem
line 102-103
//log the user out
function logout()
{
$this->data['title'] = "Logout";
//log the user out
$logout = $this->ion_auth->logout();
//redirect them to the login page
$this->session->set_flashdata('message', $this->ion_auth->messages());
redirect('auth/login', 'refresh');
}
and I changed it to:
//log the user out
function logout()
{
if($this->ion_auth->logged_in())
{
$this->ion_auth->logout();
redirect('admin/login', 'refresh');
}
}
source: I tested myself and is working just fine :)