Completed extra credit login logic.