Log system

The system logs an output code:
- 0 for success
- < 0 in case of errors
Bad password case is now handled with the right Exception.
Add log documentation to README