/// <summary>
        /// Retrieve user from local storage
        /// </summary>
        /// <param name="localStorageService"></param>
        /// <param name="error"></param>
        /// <returns></returns>
        public static User GetUser(ILocalStorageService localStorageService, out Error error)
        {
            User user;

            error = Error.NONE;

            try
            {
                user = localStorageService.GetUser();
            }
            catch (Exception ex)
            {
                user  = null;
                error = Error.LOCALSTORAGE;
                logger.error(ex.Message);
            }

            return(user);
        }