Fix crash on delete of active profile
Merge pull request #2589 from leechguy/CONTROL_AUTOLOGIN

Fix crash on delete of active profile + other fixes for PR 2577