updating to show the error messages for invalid credentials