fixed authentication to work with email and compare password hashes.