added before_action: :check_user_logged_in to users controller