public ActionResult <Login> CreateUser(Register newUser)
        {
            if (newUser.Password != newUser.ConfirmPassword || !ModelState.IsValid)
            {
                return(NotFound());
            }

            AuthenticationLogic authenticationLogic = new AuthenticationLogic(_config);
            string token = authenticationLogic.GenerateJSONWebToken(newUser.Username);

            LoginDto user     = new LoginDto(newUser.Username, newUser.Password, token);
            Login    tempUser = new Login(newUser.Username, newUser.Password);

            _repository.CreateUser(user);
            _repository.SaveChanges();

            return(CreatedAtRoute(/*nameof(GetUserById)*/ "GetUserById", new { Id = tempUser.UserId }, tempUser));
        }