added session regeneration logic to combat session fixation attacks