back port to 1.6 (still one test fails)
all tests passed on both 1.6 and 1.7

use client.login() instead of a manual post(), handy and works cross 1.6
and 1.7
work changing according to comment