$user = R::dispense('users');
$user->login = $data['login'];
$user->mail = $data['mail'];
$user->pass = password_hash($data['pass'], PASSWORD_DEFAULT);
$user->id = time();
$user->proj = '##';
R:: store($user);
$_SESSION['user'] = $user;