login page semi-working

I was able to make the login page linked to the database (kind of). It
doesn't redirect properly when login works/fails.