Refactor login error display