updated auth to use Crypto methods