by Howard Miller.
What you described should have worked.... so you can't have done what you described.
Moodle will go to the login screen if there is no config.php file - did you copy it back correctly? If it was there but there was some issue with the database then you should get a database related error. It sounds like your config.php file is missing.