Please switch the condition in order to avoid ```if not```

```ruby
if res and res.code == 302
  print_status("#{peer} - Login succesful")
else
  print_error("#{peer} - Login was not succesful!")
  return
end

```