Setting cookie with Session Key, so now if a cookie is specified the session key from that is used, otherwise a sessionkey in the query string is looked for

Signed-off-by: Martin Evans <martindevans@gmail.com>