Closing remote connection logs out macOS host

I'm using Team Viewer V12.1.76106CL on an iPhone running iOS 10.3.1, connecting to an iMac macOS Sierra 10.12.4 V12.0.75813. I find when I close my session from the iPhone, the iMac logs out of it's session, returning to a login screen. This obviously poses a problem in that it shuts down running apps on the iMac. 

Any thought?