add login function and some model