The human brain is a complex network comprised of functionally and anatomically interconnected brain regions. A growing number of studies have suggested that empirical estimates of brain networks may be useful for discovery of biomarkers of disease and cognitive state. A prerequisite for realizing this aim, however, is that brain networks also serve as reliable markers of an individual. Here, using Human Connectome Project data, we build upon recent studies examining brain-based fingerprints of individual subjects and cognitive states based on cognitively-demanding tasks that assess, for example, working memory, theory of mind, and motor function. Our approach achieves accuracy of up to 99\% for both identification of the subject of an fMRI scan, and for classification of the cognitive state of a previously-unseen subject in a scan. More broadly, we explore the accuracy and reliability of five different machine learning techniques on subject fingerprinting and cognitive state decoding objectives, using functional connectivity data from fMRI scans of a high number of subjects (865) across a number of cognitive states (8). These results represent an advance on existing techniques for functional connectivity-based brain fingerprinting and state decoding. Additionally, 16 different pre-processing pipelines are compared in order to characterize the effects of different aspects of the production of functional connectomes (FCs) on the accuracy of subject and task classification, and to identify possible confounds.