Login/Registration now working!

I got the login and registration process to work by continuing to fiddle
with the php files, and also making some corrections in the sql file.
Also fixed an error in redirect.php.