Added before filter for user authentication