roughly split the main code out into a library
oops, import from the right place
switch to argparse, accept --email and --password