logout function in progress #1