replaced $addslashes() around $token and $token_typewith addslashes() line 156/157