Creating sesion cookie if expiry is not set. Fixes issue 6834