Added a secruity class, runs checks before initial routing begins