public ActionResult Add(Contacts contact)
        {
            if (ModelState.IsValid)
            {
				if(contact.Username != User.Identity.Name){

					var data = db.Profiles.Where(e => e.Username == contact.Username).Select(e => e);

					//If the id is not associated with a row in the database, return to index. Else, continue.
					if (data.Count() == 0) {
						return RedirectToAction("Index");
					} else {
							contact.When = DateTime.Now;
							contact.Owner = User.Identity.Name;

							db.Contacts.Add(contact);
							db.SaveChanges();
							return RedirectToAction("Index"); 
					}

				} else{
					return RedirectToAction("Index");
				}
            }

            return View(contact);
        }
		public ActionResult AddFromProfile(string Username, string Name)
		{
			var data = db.Contacts.Where(e => e.Username == Username && e.Owner == User.Identity.Name).Select(e => e);
			if (data.Count() == 0) {
				if(Username != User.Identity.Name){
					var contact = new Contacts {
						Username = Username,
						Name = Name,
						Owner = User.Identity.Name,
					};
					return View(contact);

				} else {
					return RedirectToAction("Index");
				}
			} else {
				return RedirectToAction("Index");
			}
		}
		public ActionResult AddFromProfile(Contacts contact)
		{
					contact.When = DateTime.Now;
					contact.Owner = User.Identity.Name;

					db.Contacts.Add(contact);
					db.SaveChanges();
				
					return RedirectToAction("Index");
		}