Getting the client's IP address inside custom database login