Readded repeat.sh, not used automatically though. Also fixed case where user doesn't have a session object attached to socket