Fixed logout function of finish button.