Fix a bug concerning the password encryption

The bug appears when the user start the bash script. The password was
reencoded a second time and authentifaction failed.

I also moved the debug mode value into the config file.