Update login logic.