user name and password need to be encoded as well

fixes #1652 
@icewind1991 @karlitschek @MTGap