Fixed script to reconnect at auto-logout on timeout.