/**
  * Edit user name (perform the real action after form has been submitted)
  */
 public function editUsername_action()
 {
     // check if csrf token is valid
     if (!Csrf::isTokenValid()) {
         LoginModel::logout();
         Redirect::home();
         \Huge\Core\Application::stop();
     }
     UserModel::editUserName(Request::post('user_name'));
     Redirect::to('user/editUsername');
 }
 /**
  * The logout action
  * Perform logout, redirect user to main-page
  */
 public function logout()
 {
     LoginModel::logout();
     Redirect::home();
     \Huge\Core\Application::stop();
 }