added restoreSession to server and tested through client