split to js/client and php/server; fixed logger issues