Force variable value

In order to not memorize the previous value of invalid_credential,
force it to 0 at the beginning of the script.
Otherwise, if falling in the case invalid_credential=1, we keep this value
each time we call the scrip in the same bash instance.
An other way could have bean to declare the variable as local.
Added compatibility with zsh

"==" is not permited in zsh