Add buttons and implement pin checking logic.