Using brainwaves to monitor mental health