API:Logout/Sample code 1