Fixed the test for invalid credentials

+ Removed unused import