adds SecurityError when given wrong credentials