added password salting and character escaping