Login cleanup

Address comments raised in #224 after it was merged.