Implementa Application#beforeDispatch