<div id="container_form">

<form method="POST" action="login">
    <p><label for="username" id="formtitle">Вход в личный кабинет</label></p>
    <p><input name="username" type="email" autocomplete="on" placeholder="Введите электронную почту" required autofocus /><span class="icon"><i class="far fa-envelope"></i></span></p>
    <p><input name="password" type="password" minlength="5" autocomplete="current-password" placeholder="Введите пароль" required ><span class="icon"><i class="fas fa-key"></i></p>
    <p><input class="submit" type="submit" value="ВОЙТИ"></p>    
</form>

<?if (isset($error)):?>
    <div id="error" style="color: red;"><?=$error?></div>
<?endif?>

</div>