Removing notices from checkCredentials

This function doesn't receive any parameters, so some variables was used
but not initializated before.