improve default login logic, update scaffold