Hi,
The only thing I can think of that would cause login to fail is if you are using encrypted passwords and you did not update the new web.config with the same machine key that you were using before in your previous web.config file.
Redeploying older version files after upgrading is a bad idea and will usually result in errors because there can be changes in the database that won't work with older code. To go back to a previous version you should have a backup of the files and db first, then delete all the files and restore them from the backup so that no newer files are mingled in and restore the database as well.
I cannot produce any login failure with a new installation and the return url params are working correctly and are not related to a failed login.
Best,
Joe