Added credential checking