for invailid login credentials, an error message is flashed and displayed on home#index