Du hast zwei mal
PHP-Code:
if (isset($_POST['submit'])
... 
und arbeitest ohne Actions in Deinen Formularen. Wenn Du Dein zweites Formular abschickst, springt er wieder in die erste IF-Schleife und meckert dann natürlich, dass die Daten falsch sind.

Versuch es z.B. mal so für Dein Loginformular:
PHP-Code:
<form method="post" action="<?php echo $_SERVER["PHP_SELF"]?>?login=1">
...
if (isset($_GET['login'])
{
...
}
...
Und für Dein Updateformular
PHP-Code:
<form method="post" action="<?php echo $_SERVER["PHP_SELF"]?>?profil=1">
...
if (isset($_GET['profil'])
{
...
}
...
Oder nenn' Deine Submit-Buttons "submit1" und "submit2".

Die Idee mit dem PHP Tutorial wäre nicht mal so schlecht.