added tb.Model class and changes in userlogin