update LOGOUT function