Added IP logging
Fixed wrong IP address
Added an API call counter to limit API consumation