Fixed logic and tests for processing display login