Logs now uses correct mysql for IP address

IP addresses now auto-returned form mySQL correctly.