changed checkCredentials back to normal