Some changes but websocket clsoe causes sesssion close for user