implementing encodeURIComponent for password on login