OK, so basically if an IP address is in a given "authorized" list, you want to let them through, otherwise force them to login? Does this mean authorized IP addresses do not have to login, while others do (say student's off campus)?
Are the authorized IP's in a certain range? ie 192.11.XXX.XXX? if so, can you check on that, so you can scan a range, rather then on full IP address?
I assume, also, that you are checking for valid login data (a la cookie) so that an "unauthorized" user, who has logged in, doesn't keep getting thrown back to login.
Lastly, wouldn't just having all users log in, regardless of their IP address, in some fashion solve your situation?