From the problem description I understand that all users, no matter their IP address, are able to login. So this seems to be a problem with the users’’ JID. Remember that the user’‘s JID is not related to the IP address where the user is logging in from. All users of the same server will share the same domain. That means that if your server’'s name is 192.168.0.15 then all users will be of the form @192.168.0.15.
In order to see a user online the user has to approve the presence subscription request first. And in order to get the presence subscription request you have to provide the correct user’'s JID. Make sure you are using the correct JID and let us know how it goes.