Added exit handler for logout commands (ctrl+d, 2xctl+c)
Added common scope for console commands. Fixes #573
Fixed indentation
Merge pull request #601 from 1602/fix/exit-on-logout

Added exit handler for logout commands (ctrl+d, 2xctrl+c)