Allowing client to release session as well as a destructor that release current session to avoid jcr repository locks that are causing issues trying to show gallery contents