Correctly close websockets where possible.
Add onbeforeunload event for javascript-enabled.
Create redis consumer for socket connections.