Made session access synchronized to prevent errors when accessing it from multiple threads.

There were exceptions being thrown by the plugin because startSessionTask() made a new thread, and multiple threads began trying to access the session map at the same time. Added a getter for the session and made it synchronized to ensure that only one thread can access it at a time.

I suggest putting all members behind getters to make changes like this easier to make.