Added session locking support

I added session locking support to avoid problems on high traffic websites. Hope you like it.