implemented auth using bcrypt