I think this filtering is unnecessary and might even break if users have special chars in username/password. Maybe need to test?