reset to previous commit
Puts current user
Close connection after established