Fixes some bugs, set random password to a new user

Fixes issue #153