Fix user password + sql constraints

Use classic sha1 hash