Another attempt to fix ip detection issues
added debugging output
Fixed issue detecting client ip address, was a result of load balancer being between user and server
added back first connection check