Added redirect to sign in if not logged in, and show edit only to scripts that belong to user