For a good start: logging in to the control panel with mechanize.py.