Fixed router JS to prevent logged out users from posting