session life time is now configurable and set to the same value

fixes #3830

@LukasReschke @Raydiation @butonic @schiesbn THX

Once merged this has to be backported to stable5