Added more support to detect http auths

Hi,
This PR adds better detection for regular http auth attempts. I also changed the argument parser to argparse since the optparse library is deprecated.