Use Proper database quoting instead of addslashes and use password hash_auth function