logged_in()) return $this->redirect(''); if ($_POST){ $user = ORM::factory('user'); $status = Auth::instance()->login($this->request->post('login'), $this->request->post('password')); if ($status) return $this->request->redirect(''); else $this->template->error = "Неверный логин или пароль."; } } }