Made client id global, should probably be changed to retrieve dynamically