Add before_request and after_request functions

These make it slightly easier to configure one's shell