the code in both pages looks correct, to troubleshot this a bit, use PHPMyAdmin or another MySQL GUI Tool to access your local database and use the following query:
SELECT UserEmail, UserPassword FROM ps3_users WHERE UserEmail = 'your@email.com'
where 'your@email.com' is the email you are testing login with.
please post back the results that are returned from this and the password you are testing with, this info will help to see what is going wrong.