    $this->load->model('User_model', 'user');
    $user = $this->user->get_conditional_entry(array(
      'email' => $this->input->post('email')
    ));

    if($user == null) {
      $this->session->userdata('noti_msg', "User not found !");
      return redirect('/');
    } else {
      if($user->password == md5($this->input->post('password'))) {
        $this->session->set_userdata('auth_user', $user);
        return redirect('/dashboard');
      } else {
        $this->session->set_userdata('noti_msg', "Invalid password");