fix client_lib + add --user-function to command line
allow passing in None to a user function
Merge pull request #521 from Incubaid/client-lib

fix client_lib + add --user-function to command line