let credentials = {
  login: 'admin',
  password: 'qwerty',
};
document.getElementById('submit').onclick = function (event) {
  let enteredLogin = document.getElementById('login').value;
  let enteredPassword = document.getElementById('password').value;
  if (enteredLogin == credentials.login && enteredPassword == credentials.password) {
    document.getElementById('success').style.display = 'block';
    document.getElementById('error').style.display = 'none';
  } else {
    document.getElementById('success').style.display = 'none';
    document.getElementById('error').style.display = 'block';
  }
};