[TIMOB-13908] Added better error handling with logging in/out and saving...

... the cli config.