public async Task <IActionResult> CreateAccount(CreateUserAccountCredentials credentials) { var accountExists = await LoginManager.AccountExists(credentials.Username, credentials.Email); if (!accountExists) { return(CreatedAtAction("CreateAccount", await LoginManager.CreateUserAccount(credentials))); } else { return(Problem("Account Exists", statusCode: StatusCodes.Status409Conflict)); } }