/// <summary>
        /// GetCurrentUser will return the currently signed in user. Expects that BearerToken
        /// is set (which creates the cookie that will make this work)
        /// </summary>
        /// <param name="client">DigivanceClient</param>
        /// <returns>UserAccount</returns>
        public async static Task <UserAccount> GetCurrentUser(this DigivanceClient client)
        {
            HttpResponseMessage response = await client.GetAsync($"{client.BaseAddress}/auth/currentuser");

            if (response.StatusCode != HttpStatusCode.OK)
            {
                return(null);
            }

            string payload = await response.Content.ReadAsStringAsync();

            return(JsonConvert.DeserializeObject <UserAccount>(payload));
        }