Fix login encoding issue