Added passcode logic