fixes #2485 (use django to set cookie expire headers)

fixes #2485