adds isPasswordProtected function