Added functionality to routes to gate users by type