It's pretty hard to tell what is going on here, as the PHP script(s) don't generate any errors to the browser (good for security, but bad for debugging ), and I can't see the code.
The HTML produced by the login.php file shows no "action" is assigned to the submission of the "login" form so I can't tell what it is supposed to do. Without that, I can't tell where the problems lies.
I suspect that there might be a configuration variable somewhere in the set of scripts that needs to be set-up with a path or url so that the package of scripts knows where to look for it's various parts, and that this now needs to be changed to reflect the "new" domain in the path, or something similar. If the script was installed via an "installation script" of some kind, it is possible that it "setup" its configuration to reflect the original domain on which it was run; and now changes are required to account for the new domain.
That's just a "best guess" based on what I can see from the site, and might not be the right answer. Is the script you are running open-source? If so, and you point me the script, I might can tell more