Changed insert query (added salt and new hash) and also fixed a bug