Pavel_16,
страница приветствия.
<!DOCTYPE html>
<html>
<head>
<title>страница приветствия</title>
<meta charset="utf-8">
<script>
document.addEventListener("DOMContentLoaded", function() {
let user = localStorage.getItem("userName");
let title = user ? `Привет ${user}!` : `Введите своё имя.`;
let h1 = document.querySelector("h1");
h1.textContent = title;
let newname = document.querySelector("[name='newname']");
newname.hidden = !user;
let username = document.querySelector("[name='username']");
username.hidden = user;
user && (username.value = user);
let form = document.querySelector("form");
form.addEventListener("click", event => {
let {target} = event;
let txt = username.value.trim();
if (target == newname) {
localStorage.removeItem('userName');
form.action = ""
} else if (txt) {
localStorage.setItem("userName", txt);
form.action = "https://javascript.ru/forum/"//переход на страницу игры
} else event.preventDefault()
})
});
</script>
</head>
<body>
<h1></h1>
<form action="http://" >
<input name="username" hidden="hidden" required="required">
<input name="newname" type="submit" value="Новый игрок" hidden="hidden">
<input name="next" type="submit" value="Далее">
</form>
</body>
</html>