Corrected password validation and creation of new user

Passwords are now checked for equality for existing and new users. Additionally $post['id_user'] is set to null for new user.