Added client ip to logs.
Fixed wrong return value.