private async Task SignInAsync()
        {
            HasActiveTask = true;

            try
            {
                _terminator = new CancellationTokenSource();

                var token = new SignInToken { ID = _tuple.ID, Key = _tuple.Key };
                var user = await _client.SignInAsync(_tuple.Server, token, _terminator.Token);

                await _storage.StoreDataAsync("signin", new[] { _tuple });

                var parameters = new Dictionary<string, object>
                {
                    { NavigationParameters.UserID, user.ID }
                };

                NavigationService.Navigate(NavigationRegistry.HomePage, parameters);
            }
            catch (TaskCanceledException)
            {
            }
            catch (Exception ex)
            {
                var template = new DialogTemplate
                {
                    Title = "Something went wrong",
                    Content = $"There is a problem signing you in. Inquiring minds may find this information helpful: {ex.Message}",
                    PrimaryButtonText = "Close"
                };

                await _dialogService.ShowAsync(template);
            }
            finally
            {
                _terminator = null;
            }

            HasActiveTask = false;
        }
		public async Task<User> SignInAsync(string server, SignInToken token, CancellationToken terminator)
		{
			if (server == null)
				throw new ArgumentNullException(nameof(server));
			if (token == null)
				throw new ArgumentNullException(nameof(token));

			_server = server;

			var uri = new Uri(FormattableString.Invariant($"{_server}/api/signin"));
			var content = JsonObjectContent.Create(token);

			using (var response = await _client.PostAsync(uri, content, terminator).ConfigureAwait(false))
			{
				await VerifyResponseAsync(response);

				return await response.Content.ReadAsJsonObjectAsync<User>().ConfigureAwait(false);
			}
		}