adds if/else verifcations with redierects, renders, and flashes for validations on posts and comments models