public ActionResult ComposeContacts(PrivateMessage privatemessage)
        {
            if (ModelState.IsValid)
            {
                privatemessage.SenderUsername = User.Identity.Name;
                privatemessage.When = DateTime.Now;
                privatemessage.StatusOfMessage = 0;
                privatemessage.Owner = "None";

                db.PrivateMessage.Add(privatemessage);
                db.SaveChanges();
                return RedirectToAction("Inbox");
            }
            return View(privatemessage);
        }
		public ActionResult Compose(PrivateMessage privatemessage)
		{
			if (ModelState.IsValid)
			{
                if (privatemessage.ReceiverUsername != User.Identity.Name)
				{

					var data = db.Profiles.Where(e => e.Username == privatemessage.ReceiverUsername).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("Compose");
					}
					else
					{
				        privatemessage.SenderUsername = User.Identity.Name;
				        privatemessage.When = DateTime.Now;
				        privatemessage.StatusOfMessage = 0;
				        privatemessage.Owner = "None";

				        db.PrivateMessage.Add(privatemessage);
				        db.SaveChanges();
				        return RedirectToAction("Inbox");
                    }
                }
                else
                {
                    return RedirectToAction("Compose");
                }
			}
			return View(privatemessage);
		}
		public ActionResult Contact(string Username)
		{
			//So users don't send messages to themselves
			if (User.Identity.Name != Username)
			{
				PrivateMessage privatemessage = new PrivateMessage();
				privatemessage.ReceiverUsername = Username;
				return View(privatemessage);
			}
			else
			{
				RedirectToAction("Index", "Home");
			}
			return RedirectToAction("Index", "Home");
		}