Add logout logic.