Added before_action statements to app controller