fixed bug in logging if user inputs the wrong credentials