public async Task <IHttpActionResult> Register(RegisterRequest request) { request.IpAddress = GetIpRequest(); var settings = new AppSettings(); request.AccountActivationEmailToken = Guid.NewGuid(); request.AccountActivationEmailUrl = string.Format( "{0}{1}/Home/Activate?token={2}", settings.MemberWebsiteUrl, request.CultureCode, request.AccountActivationEmailToken); await _memberApiProxy.RegisterAsync(request); return(await Login(new LoginRequest { Username = request.Username, Password = request.Password })); }