make Maxage work, check the same Set-Cookie header

1. make the Maxage config of cookie session work
2. check whether there exits the same cookie id, if so, then return directly.