Created logout method