Add process login function.