Changes and adds setting of session variables