commit before logout