Reverted previous changes and fixed the register form's action in register.php Also added a warning message for failed logins.