Completed UI login logic.