added handling error of invalid login or passord