Make the Maxage Config of cookie session work

Make the Maxage Config of cookie session work