updated the before filter for authentication