Drupal 7 sessions wiped after changing settings.php
This is likely due to the value changing, which changes the way they are recorded:

https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/drupal_settings_initialize/7.x

$base_url and $cookie_domain - changing these values in settings.php will affect any user who was authenticated before if the values change, and will need to re-authenticate.