refactor login api
change db script