added url encoding for username