add model and controller for login function