Implemented base for session rename function.