Added has_secure_password and other fixes