logout as last step