diff --git a/~dev_rating/application/classes/Controller/Handler.php b/~dev_rating/application/classes/Controller/Handler.php
index 7c488a2a36274346395907e40257f0a118fdb6df..4ac390cb261ad016fcef918ef6f529254b3830bc 100644
--- a/~dev_rating/application/classes/Controller/Handler.php
+++ b/~dev_rating/application/classes/Controller/Handler.php
@@ -20,7 +20,7 @@ class Controller_Handler extends Controller {
 
     public function before()
     {
-        $isDownload = Cookie::get('fD');
+        // $isDownload = Cookie::get('fD'); // TODO: check - unused var
         $this->user = User::instance();
         // Если у нас запрос идет не из AJAX
 //        if(!$this->request->is_ajax() && !$isDownload)
@@ -41,10 +41,12 @@ class Controller_Handler extends Controller {
         // Получаем имя маршрута 
         $route = Route::name($this->request->route());
         $route .= ':'.$this->request->controller();
-        $userMark = (int)$this->user->RoleMark;
-        if ($userMark == 0) {
+        try {
+            $userMark = (int)$this->user->RoleMark;
+        } catch (Exception $e) {
             $userMark = (int)1;
         }
+
         // Если запрос не прошел на проверку доступа
         if( !$this->checkAccessLevel() || 
             !$this->checkBitmask($userMark, $route))
diff --git a/~dev_rating/application/classes/Controller/Handler/Sign.php b/~dev_rating/application/classes/Controller/Handler/Sign.php
index ea05703be63ede8a4876da9e54e395600666fd73..e773673a57a75866f9fe32d100035dacd5dd1f4b 100644
--- a/~dev_rating/application/classes/Controller/Handler/Sign.php
+++ b/~dev_rating/application/classes/Controller/Handler/Sign.php
@@ -10,7 +10,8 @@ class Controller_Handler_Sign extends Controller_Handler {
         public function action_in()
         {
             $this->post->rule('login', 'email')->rule('login', 'not_empty');
-            $checklogin = true; $response['success'] = false;
+            $checkLogin = true;
+            $response['success'] = false;
             if(!$this->post->check())
             {
                 $this->post = Validation::factory($this->post->data());
@@ -18,10 +19,10 @@ class Controller_Handler_Sign extends Controller_Handler {
                 if(!$this->post->check())
                 {
                     // Данные не безопасны, даже не пытаемся авторизоваться
-                    $checklogin = false;
+                    $checkLogin = false;
                 }
             }
-            if($checklogin)
+            if($checkLogin)
             {
                 $response['success'] = User::instance()
                         ->signIn($this->post['login'],
diff --git a/~dev_rating/modules/account/classes/Kohana/User.php b/~dev_rating/modules/account/classes/Kohana/User.php
index 823579b1b0cfdf4a3689979ffae978d83b3066cd..0db3e694262d30e64bad647facf0dd63f9ebd6cb 100644
--- a/~dev_rating/modules/account/classes/Kohana/User.php
+++ b/~dev_rating/modules/account/classes/Kohana/User.php
@@ -139,7 +139,7 @@ class Kohana_User implements ArrayAccess
         $this->_session->set('UserHash', $this->hash($userHash));
         $this->_session->set('PasswordHash', $passwordHash);
         $this->_session->set('start_time', time());
-        $this->_session->set("SemesterID", $semester);
+        $this->_session->set('SemesterID', $semester);
 
         return true;
     }