adding fix for old passwords and removing json depndency from php