Special Characters,
Not sure if this happened only to me, but it is not the first time when I have encountered this problem. I have a password that contains some of those characters: ! " £ $ % ^ & * ( ) . Therefore, when I used the BasicAuth and I used this password with a username I got a 401 error which is Unauthorized Error. So the basic64 encoding on your app is not working properly.