user name and password need to be encoded as well

fixes core/#1652

@icewind1991 @karlitschek @MTGap