leave and quit commands added

fixes #1
error handling

fixes #4