in reply to Login to the URL

What have you tried?
Show us.

PM exists to help you learn; not to write your code for you.

While cargo-culting code from the Monastery is probably a common occurance, modifying it to suit your own requirements is your responsibility.

Nonetheless, here's a hint: ascertaining where to place a snippet on this order:

if (condition){ print "log..."; } else { print "negative login...."; }

would worth considering.

Come back to show us some code... and some effort... and we'll almost certainly provide more specific help.

If you didn't program your executable by toggling in binary, it wasn't really programming!