You can use the following code to delete Cookie in Phantomjs:
if( phantom.deleteCookie('username') ...