Improved password cryptography

Used password_hash if exists. If not, use sha1 (previous version).