changed redirect so that if you haven't logged in you get redirected to the login page.
Ensures that the correct password is used for the username.