implemented check of credentials