Can you not store the static IP of your client against the login account details in the database, and then when the user logs in, firstly check the login details are correct and then secondly check that the IP address they are coming from matches the one in the database?
Not totally sure why you are restricting access to IP's only. Surely if someone has login details then they should be allowed access regardless of their IP?