Fixed errors with the use of has_secure_password in the User model, inva...

...lid login will now be redirected to the login view rather than crashing.