Closing the Loop with Optogenetics