Tweaks to login control flow