Sorry, I'm not going to answer your question here, but add some reasons why you might not want to get that IP-Address. For some setups it's common, that requests from one client come through multiple IP-addresses: Either they might be behind a loadbalancer, bundling some connections that have different external IP-addresses, or they might hide behind a proxy farm, where each proxy comes with different addresses.
Also, with a proxy or with NAT involved, you might get multiple clients from the same IP-address.
Therefor: Please take extreme care if you use the client address for authentication purposes: You might need multiple addresses for one client or have multiple clients from one address. Also, you can have multiple clients from (the same) multiple addresses. I've seen many dangerous assumptions regarding the client addresses.
Take care!