Fixes #5872 Adding an expiry of 30 days to the cookie to ensure that browsers don't delete the cookie when the browser session is closed.