Added a function to get a client's IP address.