Added beforeEach and middleware differentiation
Got beforeEach working