Fixed deauthentication and fixed error with bad free