Can check whether credentials are valid.