public async Task <UserRegisterResponse> RegisterUser(UserRegisterRequest user)
        {
            if (user.Login == null || await _userRepository.UserExists(user.Login) || _validations.ValidateUserRegister(user).Count != 0)
            {
                if (user.Login != null && await _userRepository.UserExists(user.Login))
                {
                    user.Errors.Add("User with that login already exist!");
                }
                user.Errors = _validations.ValidateUserRegister(user);
                return(new UserRegisterResponse()
                {
                    Success = false,
                    Token = null,
                    UserModel = new UserForResponse()
                    {
                        Login = user.Login,
                        Email = user.Email,
                        FullName = string.IsNullOrWhiteSpace(user.Name) || string.IsNullOrWhiteSpace(user.Surname) ? user.Name + user.Surname : GetValidName(user.Name, user.Surname)
                    },
                    Errors = user.Errors
                });
            }

            var userToRegister = new User()
            {
                Login    = user.Login,
                Password = !string.IsNullOrWhiteSpace(user.Password) ? GetPasswordHashSalt(Encoding.UTF8.GetBytes(user.Password)) : null,
                Email    = user.Email,
                FullName = GetValidName(user.Name, user.Surname),
                Role     = "User"
            };

            var userToPass = await _userRepository.RegisterUser(userToRegister);

            userToPass.Token = GetAccessToken(userToRegister);
            return(userToPass);
        }