model for login and controller