Database Password Hashing and Socket Connection Handling