public void RegisterUser(string username, string password, string firstName, string surname, int roleId)
 {
     tbl_Users u = new tbl_Users();
     u.Username = username;
     u.Password = password;
     u.FirstName = firstName;
     u.Surname = surname;
     u.RoleId = roleId;
     db.tbl_Users.Add(u);
     db.SaveChanges();
 }
 public ActionResult Login(tbl_Users u)
 {
     if (ms.Login(u.Username, u.Password))
     {
         ViewBag.Message = "";
         FormsAuthentication.SetAuthCookie(u.Username, true);
         return RedirectToAction("Index", "Home");
     }
     else
     {
         ViewBag.Message = "Invalid Credentials";
         return View();
     }
 }