You're exiting the loop too soon. You can't know if the guest isn't found until you've gone through the entire loop.
my $found;
open IPFILE, "< $ipfile" or die "couldn't read $ipfile: $!";
while (<IPFILE>) {
last if $found = /\Q$remote_addr\E/o;
}
close IPFILE;
if ($found) { print "user found!\n" }
else { print "user not found!\n" }