updated store.save(session) to take the max expiry from the session object