Allow apps to create custom session handlers.
Merge pull request #8557 from owncloud/custom_session_handling

Allow apps to create custom session handlers.