Added ClientHandler separately

Added a client handler to control the clients connecting - amended the
issue when clients disconnect - keep count of connections