Resolve issue #694 adapted to use addslashes() which fixes empty password use