Support for bcrypt passwords + misc fixes