/// <summary>
        /// Saves the new user.
        /// </summary>
        /// <param name="view">The view.</param>
        /// <returns></returns>
        private ActionResult SaveNewUser(UserRegisterView view)
        {
            Domain.Model.User user = view.GetUser();
            _fileService.CreateBucket(user.Username.ToLower());
            _userRepository.Save(user);

            Domain.Model.User newUser = _userRepository.RetrieveUserByLoginCredentials(user.Username, user.Password);
            _userSession.Login(newUser, false, string.Format("~/{0}/dashboard", newUser.Username));
            ActionResult action = RedirectToAction("Index", user.Username);
            return action;
        }
        public ActionResult Index(UserRegisterView view, string token)
        {
            ActionResult actionResult = RedirectToAction(string.Empty, "join");

            if (!string.IsNullOrEmpty(token))
            {
                int tokenCount = _joinRepository.GetTokenCount(token);
                bool validToken = (tokenCount == 1);

                if (validToken)
                {
                    actionResult = GetResult(view);
                }
            }

            return actionResult;
        }
        /// <summary>
        /// Gets the result.
        /// </summary>
        /// <param name="view">The view.</param>
        /// <returns></returns>
        protected ActionResult GetResult(UserRegisterView view)
        {
            // ReSharper disable Asp.NotResolved
            ActionResult action = View(view);
            // ReSharper restore Asp.NotResolved

            if (ModelState.IsValid)
            {
                action = SaveNewUser(view);
            }
            else
            {
                ValidationHelper.ValidationHackRemoveNameAndBlankKey(ModelState);
                view.ErrorMessage = "<span class='errormessage' >Oops, one or more errors have occured. Please verify your entries and try again.</span>";
            }

            return action;
        }