It seems to be good, thanks for your answer.
Sorry for my bad english and being a php-sql's noob.
On line 264 AFTER
if(isset($_POST['remember'])){
setcookie("cookname", $_SESSION['username'], time()+60*60*24*100, "/");
setcookie("cookpass", $_SESSION['password'], time()+60*60*24*100, "/");
}
ADD
else
{
setcookie("cookname", "", 0, "/");
setcookie("cookpass", "", 0, "/");
}