Feature: better login code handling