fix client input problem

fix not getting message, does not quit, server does not disconnect from
user, readline method blocking the process