Updated client IP detection