Code improvements

Replaced client index to userid in timers.
Fixed mistake in LogAction.