Created controller to access events and posts